FROM openjdk:17-jdk-slim

# 1. 更换阿里云源并安装 ffmpeg
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
    sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
    apt-get update && \
    apt-get install -y ffmpeg

# 2. 创建目录并设置权限
RUN mkdir -p /home/uploads/images && \
    chmod -R 777 /home/uploads/images && \
    mkdir -p /home/uploads/video && \
    chmod -R 777 /home/uploads/video

# 剩余部分保持不变...
VOLUME /home/uploads/images/
VOLUME /home/uploads/video/
COPY *.jar /app.jar
EXPOSE 8081
ENTRYPOINT ["java","-jar","/app.jar"]